import React from 'react';
import {View, Button, StyleSheet} from 'react-native';

export default function App() {
  return (
    <View style={styles.container}>
      <Button title="底层按钮" onPress={() => console.log('底层按钮被点击')} />

      <View style={styles.overlay} pointerEvents="none">
        <Button
          title="覆盖按钮"
          onPress={() => console.log('覆盖按钮被点击')}
        />
      </View>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  overlay: {
    backgroundColor: 'rgba(255, 0, 0, 0.5)',
    position: 'absolute',
    top: 50,
    left: 50,
  },
});
